// Install necessary packages
ssc install pdslasso
ssc install lassopack

// Read in command line arguments
args params roster a b c d

* Load local variables from the parameter file
include "`params'"

insheet using "`roster'", comma clear

// Create (and/or prepare) spreadsheet
putexcel set "`a'", modify

// Run double lasso regression
pdslasso i_three_components_post_20 `treatment' (`covariates' `blocks'), partial(`blocks') robust

// Write our results to previously specified spreadsheet
putexcel A1 = etable

putexcel set "`b'", modify

pdslasso a_shooting_or_homicide_post_20 `treatment' (`covariates' `blocks'), partial(`blocks') robust

putexcel A1 = etable

putexcel set "`c'", modify

pdslasso a_partone_non_shoot_hom_post_20 `treatment' (`covariates' `blocks'), partial(`blocks') robust

putexcel A1 = etable

putexcel set "`d'", modify

pdslasso v_shooting_or_homicide_post_20 `treatment' (`covariates' `blocks'), partial(`blocks') robust

putexcel A1 = etable

clear
